import { browserHistory } from 'react-router';
import Button from '../../client/components/base/Button';
import Base from './Base';

export default class Games extends Base {
    constructor(props) {
        super(props);
        this.onClick = this.onClick.bind(this);
    }

    onClick(value) {
        browserHistory.push(`/${value}`);
    }

    content() {
        return (
            <div className="games-home">
                <Button text="数独" value="sudoku" class="btn-info btn-lg" onClick={this.onClick}/>
                <Button text="弹球" value="elastic-ball" class="btn-info btn-lg" onClick={this.onClick}/>
                <Button text="五子棋" value="gobang" class="btn-info btn-lg" onClick={this.onClick}/>
                <div>
                    <Button text="test" value="test" class="btn-info btn-lg" onClick={this.onClick}/>
                </div>
            </div>
        );
    }
}
